package com.wl.feign;

import com.wl.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * feign接口
 */
@RequestMapping("/user")
@FeignClient(value = "user-service",fallbackFactory = UserFeignFallbackFactory.class)
public interface UserFeign  {
    @GetMapping("/getById/{id}")
     User getById(@PathVariable("id") Long id);
}
